/**
* @author maze | guavestudios.com
* @license MIT License see LICENSE.TXT
* @version 0.1
*/
package com.guavestudios.fcon.commands {
	import com.guavestudios.fcon.api.*;
	import com.guavestudios.fcon.core.*;
	public class PrintCommand implements INamedCommand{
		
		//{ STATIC
	
		//}
		
		//{ MEMBERS
		
		//}
		
		//{ GETTER-SETTER
		
		//}
		public function PrintCommand() {
			
			
			init();	
		}
		private function init():void {
			
		}
		//{ PUBLIC FUNCTIONS
		public function execute(args:Array):void
		{
			var c:IControlableConsole=args[0] as IControlableConsole;
			var output:String="";
			var o:Object;
			for (var i:int=1,len:int=args.length; i<len; i++)
			{
				o=args[i];
				if (o==null) 
				{
					
				}
				else if (o is PathElement)
					output+=PathElement(o).getElement().toString();
				else output+=o.toString();
				output+=" ";
			}
			c.outputText(output);
			
		}
		public function getCommandName():String
		{
			return "print";
		}
		//}
		
		//{ OVERRIDEN METHODS
		
		//}
		
		//{ PRIVATE FUNCTIONS
		
		//}

	}
	
}
